package Work4.Slay_the_Maze.Cards;

import Work4.Slay_the_Maze.Monsters.Monster;
import Work4.Slay_the_Maze.Player.*;
import java.util.ArrayList;

public abstract class Cards {
	private String name;
	private int cost;
	private String cardtype;
	private int value;
	public Cards(int cost,String name,String cardtype,int value) {
		this.cost = cost;
		this.name = name;
		this.cardtype = cardtype;
		this.value=value;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getCost() {
		return cost;
	}
	public void setCost(int cost) {
		this.cost = cost;
	}
	public String getCardtype() {
		return cardtype;
	}
	public void setCardtype(String cardtype) {
		this.cardtype = cardtype;
	}
	
	public int getValue() {
		return value;
	}
	public void setValue(int value) {
		this.value = value;
	}
	public boolean usemana(Player player) {
		if(player.getTurnmana()>=cost) {
			player.setTurnmana(player.getTurnmana()-cost);
			return true;
		}else {
			System.out.println("能量不足");
			return false;
		}
	}
	public abstract void PrintInfo();
	public abstract void Useit(Player player,ArrayList<Monster> monsters);
	public abstract Cards clone();
}
